package co.yixiang.controller.common;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import co.yixiang.common.utils.ResultUtil;
import co.yixiang.common.vo.ResultMessage;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/common")
public class ExpressageController {



    @GetMapping(value = "/expressage/message")
    public JSONObject getTianQi(HttpServletRequest request) {
        Map<String, Object> map = new HashMap<>();
        map.put("EBusinessID", "1151847");
        map.put("UpdateTime", DateUtil.format(LocalDateTime.now(), "yyyy-MM-dd HH:mm:ss"));
        map.put("Success", true);
        map.put("Reason", "");
        final JSONObject jsonObject = JSONUtil.parseObj(map);
        return jsonObject;
    }
}
